package com.qiuhui.service;

import com.qiuhui.entity.Poetry;
import com.qiuhui.mapper.PoetryMapper;

import java.util.List;

/**
 * @ClassName: PoetryServiceImpl
 * @Description: TODO
 * @author: tian
 * @date: 2021/3/24  3:46 下午
 */
public class PoetryServiceImpl implements PoetryService {
    // 调用mapper层，设置set接口，方便spring管理
    private PoetryMapper poetryMapper;

    public void setPoetryMapper(PoetryMapper poetryMapper) {
        this.poetryMapper = poetryMapper;
    }

    @Override
    public List<Poetry> getPoetryByList() {
        return poetryMapper.getPoetryByList();
    }

    @Override
    public int addPoe(Poetry poe) {
        return poetryMapper.addPoe(poe);
    }

    @Override
    public int delPoe(int id) {
        return poetryMapper.delPoe(id);
    }

    @Override
    public int updatePoe(Poetry poe) {
        return poetryMapper.updatePoe(poe);
    }

    @Override
    public Poetry getPoe(int id) {
        return poetryMapper.getPoe(id);
    }
}
